package net.sxnic.jhitem.itemgjhzunit.dao;

import java.util.List;

import net.sxnic.jhitem.itemgjhzunit.ItemGjhzunit;
import net.sxnic.jhitem.itemgjhzunit.dao.ItemGjhzunitDao;
import net.sxinfo.core.spring25.HibernateDao;

import org.springframework.stereotype.Repository;

@Repository("itemGjhzunitDao")
public class HibernateItemGjhzunitDao extends HibernateDao<ItemGjhzunit, String> implements
	ItemGjhzunitDao {

	/**
	 * 获取国外合作机构
	 * @param baseinfoId 主表ID
	 * @return 国外合作机构List
	 */
	public List<ItemGjhzunit> findGwGjhzunit(String baseinfoId)
	{
		String hql = "from ItemGjhzunit where coType='001' and baseinfoId=?";
		return this.find(hql, new Object[]{baseinfoId});
	}
	
	/**
	 * 获取国内合作机构
	 * @param baseinfoId 主表ID
	 * @return 国内合作机构List
	 */
	public List<ItemGjhzunit> findGnGjhzunit(String baseinfoId)
	{
		String hql = "from ItemGjhzunit where coType='002' and baseinfoId=?";
		return this.find(hql, new Object[]{baseinfoId});
	}
}
